package com.imooc.uaa.controller;

import com.imooc.uaa.domain.dto.UserDto;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author 江黎
 * @date 2022-02-11
 */
@RestController
@RequestMapping("/authorize")
public class UserResources {

    @GetMapping("greeting")
    public String greeting() {
        System.out.println("SecurityContextHolder.getContext().getAuthentication() = " + SecurityContextHolder.getContext().getAuthentication());
        return "hello world";
    }

}
